<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2021/11/16
  Time: 10:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>用户管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />

    <link rel="stylesheet" href="<%=path %>/web/index/css/font.css">
    <link rel="stylesheet" href="<%=path %>/web/index/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="<%=path %>/web/index/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="<%=path %>/web/index/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <script type="text/javascript">
        function save(){
            window.location.href = "tab_users_pre_save";
        }
        function del(id){
            if(window.confirm('你确定要删除此条数据吗？')){
                window.location.href = "tab_users_del?id="+id;
                return true;
            }
        }
    </script>


</head>

<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">用户管理</a>
        <a>
          <cite>基础数据</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row" style="text-align: left;">
        <form class="layui-form layui-col-md12 x-so" action="/tab_users_view" method="post" style="text-align: left;">
            <input type="text" name="loginname"  placeholder="请输入登录账号" autocomplete="off" value="${loginname}" class="layui-input">
            <button class="layui-btn"  lay-submit="" lay-filter="sreach" type="submit"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <xblock>
        <button class="layui-btn" onclick="save()"><i class="layui-icon"></i>新用户创建</button>
        <span class="x-right" style="line-height:40px">共有数据：${rows} 条</span>
    </xblock>
    <table class="layui-table">
        <thead>
        <tr>
            <th style="width:2%;">#</th>
            <th style="width:6%;">头像</th>
            <th style="width:8%;">登录名</th>
            <th style="width:6%;">真实名</th>
            <th style="width:5%;">年龄</th>
            <th style="width:5%;">性别</th>
            <th style="width:10%;">联系电话</th>
            <th style="width:8%;">Email</th>

            <th style="width:6%;">来源</th>
            <th style="width:6%;">经办人</th>
            <th style="width:8%;">经办日期</th>

            <th style="width:6%;">开卡状态</th>
            <th style="width:8%;">余额（￥）</th>

            <th style="width:6%;">状态</th>
            <th style="width:12%;font-size: 8px;">操作</th>
        </thead>
        <tbody>
        <c:forEach items="${list }" var="it" varStatus="vs">
            <tr>
                <td>${vs.count}</td>
                <td>
                    <img src="<%=path %>/upload/${it.em4 }" onerror="this.src='<%=path %>/upload/m.jpg'" style="width: 40px;height: 40px;">
                </td>
                <td>${it.loginname}</td>
                <td>${it.username}</td>
                <td>${it.age}</td>
                <td>${it.sex}</td>
                <td>${it.tel}</td>
                <td>${it.email}</td>

                <td>${it.em1}</td>
                <td>${it.em2}</td>
                <td>${it.em3}</td>

                <td>
                    <c:if test="${it.accid=='未开卡'}">未开卡</c:if>
                    <c:if test="${it.accid!='未开卡'}">已开卡</c:if>
                </td>
                <td>${it.monnum}</td>

                <td class="td-status">
                    <c:if test="${it.flag == '0'}"><strong style="color: #01AAED;">启用</strong></c:if>
                    <c:if test="${it.flag == '1'}"><strong style="color: darkred;">关闭</strong></c:if>
                </td>
                <td class="td-manage">
                    <c:if test="${it.flag == '1'}">
                        <a  href="tab_users_update_flag_open?id=${it.id }"  title="启用">
                            <i class="layui-icon"  style="font-size: 11px;">&#xe62f;</i>启用
                        </a>
                    </c:if>
                    <c:if test="${it.flag == '0'}">
                        <a  href="tab_users_update_flag_close?id=${it.id }"  title="启用">
                            <i class="layui-icon">&#xe601;</i>关闭
                        </a>
                    </c:if>

                    <c:if test="${it.accid == '未开卡' }">
                        <a title="开卡"   href="/tab_users_acc_pre_create?usersid=${it.id }">
                            <i class="layui-icon">&#xe609;</i>开卡
                        </a>
                    </c:if>
                    <c:if test="${it.accid != '未开卡' }">
                    <a title="充值"   href="/tab_users_acc_pre_up_money?usersid=${it.id }&accid=${it.accid }">
                        <i class="layui-icon">&#xe62e;</i>充值
                    </a>
                    </c:if>

                    <a title="修改"   href="/tab_users_pre_update?id=${it.id }">
                        <i class="layui-icon">&#xe642;</i>修改
                    </a>
                    <a title="删除" onclick="del('${it.id }')" href="javascript:;">
                        <i class="layui-icon">&#xe640;</i>删除
                    </a>




                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="page">
       ${pager }
    </div>

</div>

</body>

</html>
